Fix sticky scroll height calculation for variable line heights#3971
Conversation
|
There is a test failure in |
f731e13 to
2e83544
Compare
Fixed in the latest version 👍 |
|
@HeikoKlare: We missed to merge this last week for M3 - thanks to the bridge day. |
When emoji or other content affects line heights, sticky scroll was calculating the total height wrong by assuming all lines were the same. Now it gets the actual height for each line instead. Also fixes the height check for limiting visible lines.
2e83544 to
5686df7
Compare
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
Description:
StickyScrollingControlwas computing the sticky area height by multiplying a single line height by the number of sticky lines. This assumption breaks when content like emoji causes individual lines to render taller than the default — the canvas ends up too short, clipping the sticky lines visually.calculateCanvasBoundsnow sums the actual height of each sticky line usinggetLineHeight(offset)instead of using a uniformgetLineHeight().Reproduce:
Create an XML file with the content below. Enable sticky scrolling and scroll a few lines:
Follow up of #3748